@layout("/common/_container.html"){
<link href="${ctxPath}/static/css/doctor/rootCanalScore.css" rel="stylesheet">
<div id="rootCanalScore">
    <input type="hidden" id="num" value="${num}">
    <input type="hidden" id="reservationsId" value="${reservationsId}">
    <input type="hidden" id="toothPositionA" value="${info.toothPositionA}">
    <input type="hidden" id="toothPositionB" value="${info.toothPositionB}">
    <input type="hidden" id="toothPositionC" value="${info.toothPositionC}">
    <input type="hidden" id="toothPositionD" value="${info.toothPositionD}">
    <div id="rootCanal_Header">根管评分</div>
    <div id="rootCanal_Content">
        <div style="display: flex">
            <div>
                @include("/common/tooth_position3.html"){
                @}
            </div>
            <div style="padding: 40px 30px;position: relative;">
                <span>牙位<span style="color: red;">*</span></span>
                <div id="projectListInfo" style="width: 300px;margin-top: 20px;">
                    <div id="toothBox" class="toothBox" style="display: flex;flex-direction: column;flex: 1;height: 40px;">
                        <div style="flex: 1;display: flex;border-bottom: 1px solid #999999;line-height: 20px;">
                            <div id="leftUp" class="leftUp" style="flex: 1;border-right: 1px solid #999999;text-align: right;padding-right: 5px;"></div>
                            <div id="rightUp" class="rightUp" style="flex: 1;padding-left: 5px;text-align: left;"></div>
                        </div>
                        <div style="flex: 1;display: flex;line-height: 20px;">
                            <div id="leftDown" class="leftDown" style="flex: 1;border-right: 1px solid #999999;text-align: right;padding-right: 5px;"></div>
                            <div id="rightDown" class="rightDown" style="flex: 1;padding-left: 5px;text-align: left;"></div>
                        </div>
                    </div>
                </div>
                <div style="position: absolute;bottom: 0;width: 500px;color: #FF7E00;">注：牙位只能选择一个，根管片上传&le;2张，消费金额是单个牙位</div>
            </div>
        </div>
        <div id="RootFilling">
            <div>
                <span>医生</span>
                <span><select name="doctor" id="doctor">
                    <option value="">请选择</option>
                    @for(str in doctorList){
                    @if(info.doctor == str.doctor ){
                    <option value="${str.doctor}" selected="selected">${str.doctor}</option>
                    @}
                    @if(info.doctor != str.doctor ){
                    <option value="${str.doctor}">${str.doctor}</option>
                    @}
                    @}
                </select></span>
            </div>
            <div>
                <span>护士</span>
                <span><input type="text" id="nurse" autocomplete="off" value="${info.nurse}"></span>
            </div>
            <div>
                <span>治疗种类选择</span>
                <span>
                    <select name="treatmentTypes" id="treatmentTypes">
                        <option value="">请选择</option>
                        @if(info.treatmentTypes == '冷牙胶' ){
                        <option value="冷牙胶" selected="selected">冷牙胶</option>
                        <option value="热牙胶">热牙胶</option>
                        @}
                        @if(info.treatmentTypes == '热牙胶' ){
                        <option value="冷牙胶">冷牙胶</option>
                        <option value="热牙胶" selected="selected">热牙胶</option>
                        @}
                    </select>
                </span>
            </div>
            <div>
                <span>消费金额</span>
                <span><input type="text" id="consumptionAmount" autocomplete="off" value="${info.consumptionAmount}"></span>
            </div>
            <div>
                <button class="btn btn-default" type="button" id="avatar0BtnId">术后根充片上传<span style="color: red;">（必选）</span></button>
            </div>
        </div>
        <div>
            <div id="avatar0PreId" style="display: flex;padding-bottom: 10px;">
                @for(item in infoList){
                    @if(item.status == '0' && item.imgtpye == '0'){
                        <div id="${item.imgid}" class="cp_img imagePathBox">
                            <a href="javascript:void(0)" data-magnify="gallery" data-group="g1" data-src="${item.imageUrl}" data-caption="术后根充片">
                                <img class="imagePath" src="${item.imageUrl}" alt="..." style="width: 180px;height: 110px;">
                            </a>
                            <div class="cp_img_delete">删除</div>
                        </div>
                    @}
                @}
            </div>
        </div>
    </div>
    <div id="rootCanal_footer">
        <button class="btn btn-default" type="button" onclick="storageRootCanal()">暂存</button>
        <button class="btn btn-default" type="button" onclick="subRootCanal()">提交</button>
        <button class="btn btn-default" type="button" onclick="rootCanalClose()">关闭</button>
    </div>
</div>
<script src="${ctxPath}/static/modular/doctorLooked/rootCanalScore-icon.js?v=20200628"></script>
<script src="${ctxPath}/static/modular/doctorLooked/doctor_rootCanalScore.js?v=20200628"></script>
<script>
    $(function () {
        if($("#toothPositionA").val() != ""){
            $("#leftUp").html($("#toothPositionA").val())
        }else if($("#toothPositionB").val() != ""){
            $("#rightUp").html($("#toothPositionB").val())
        }else if($("#toothPositionC").val() != ""){
            $("#rightDown").html($("#toothPositionC").val())
        }else if($("#toothPositionD").val() != ""){
            $("#leftDown").html($("#toothPositionD").val())
        }
        $('#avatar0PreId').Magnify({
            Toolbar: ['prev', 'next', 'rotateLeft', 'rotateRight', 'zoomIn', 'actualSize', 'zoomOut'],
            keyboard:true, draggable:true, movable:true, modalSize:[1100,700],
            beforeOpen:function (obj,data) {}, opened:function (obj,data) {},
            beforeClose:function (obj,data) {}, closed:function (obj,data) {},
            beforeChange:function (obj,data) {}, changed:function (obj,data) {}
        });
    })
</script>
@}